package perform.session;

import java.util.List;

import perform.criterion.Criterion;
import perform.criterion.Order;
import perform.type.Type;

public interface Session {

	public <T extends Type> T save(T type);

	public <T extends Type> List<T> save(List<T> types);

	public <T extends Type> void update(T type);

	public <T extends Type> void update(List<T> types);

	public <T extends Type> void delete(T type);

	public <T extends Type> void delete(List<T> types);

	public <T extends Type> T get(T type);

	public <T extends Type> List<T> get(Class<T> clazz, Criterion criterion);

	public <T extends Type> List<T> get(Class<T> clazz, Criterion criterion,
			Order order);

	public <T extends Type> List<T> get(Class<T> clazz, Criterion criterion,
			Order order, int lowLimit, int highLimit);

	public <T extends Type> List<T> get(Class<T> clazz, String criteria);

	public <T extends Type> List<T> get(Class<T> clazz, String criteria,
			Order order);

	public <T extends Type> List<T> get(Class<T> clazz, String criteria,
			Order order, int lowLimit, int highLimit);

	public <T extends Type> List<T> getCustom(Class<T> clazz, String from);

	public void customUpdate(String query);

}
